<%@ page contentType="text/html;charset=gb2312" %>

<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>

<%@ page import='org.w3c.dom.*'%>
<%@ page import="com.rhb.web.util.Tree"%>
<%@ page import="com.coco.erp.hr.department.web.struts.form.*"%>

<html>

<head>
    <title>tree</title>
    <Link Rel="STYLESHEET" Href="../css/style.css" Type="text/css">
    <SCRIPT LANGUAGE="Javascript">
	    function click(){
		    var Esrc=event.srcElement;
		    if(Esrc.className=="folder"){
		        if(document.all(Esrc.id+"d").style.display=="none"){
		          document.all(Esrc.id+"d").style.display="";
		          Esrc.src="images/dir_open.gif";
		         }else{
		             document.all(Esrc.id+"d").style.display="none";
		            Esrc.src="images/dir_close.gif";
		        }
		    }
		    return;
		}
		
		function doIt(){
			alert('doIT');
		}
		
		document.onclick = click;
    </SCRIPT>
</head>

<body>
<div class="outer" style="width: 100%;margin: 10px;">
<div class="inner" style="width: 100%;">
<div class="favMenu" id="aMenu">
<%
DepartmentForm df = (DepartmentForm)session.getAttribute("departmentForm");
Document departmentXMLDoc = df.getDepartmentXMLDoc();

String url = "DepartmentEdit.jsp?departmentPK=";
String turl="OrganizationEdit.jsp?organizationPK=";
String color="";
String target="smain";
String[] str= null;


if(departmentXMLDoc!=null){
	Tree tree = new Tree(departmentXMLDoc);
	tree.setUrl(url);
	tree.setTLink(turl);
	tree.setTarget(target);
	tree.setAtr("pk");
	tree.setUsePic(true);
	tree.show(out);
}
%>
</div></div></div>
</body>

</html>